package com.space.service;

import com.space.entity.Flight;
import com.space.entity.FlightStatusCount;
import com.space.entity.Rflight;
import com.space.entity.User;
import com.space.exception.MyException;

import java.util.List;
import java.util.Map;

/**
 * @author : 港某
 * @date : 2020/2/13 16:50
 */
public interface FlightService {
    List<Flight> selectAllFlight();

    List<Integer> selectSomeFlightByHot();

    List<Flight> selectSomeFlightByExpense(int expenseId, int userId);

    List<Flight> selectFlightByUserSearch(String flightStartArea, String flightEndArea, String flightStartTime, boolean check);

    List<Map<String, String>> selectFlightByAi(String flightStartArea, String flightEndArea, String flightStartTime);

    Map<String, List<Flight>> selectHotFlight();

    Rflight selectSomeFlightByPage(String nowPage, String flightStartTime, String flightStartArea, String flightEndArea);

    Flight selectFlightById(int flightId);

    FlightStatusCount selectSomeFlightCount();

    int selectAllFlightCount();

    void bookFlight(String flightId1, String flightId2, User user);

    void insertFlight(String flightStartArea, String flightEndArea, String flightStartTime, String flightPrice) throws MyException;

    void deleteFlightById(int[] flightIdArr);

    void updateFlightById(int flightId, String flightStartTime, String flightPrice);

    void updateFlightStartStatusId();

    void updateFlightEndStatusId();

}
